﻿using RXY_Mall.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application
{
    public class RXY_MallAppServiceBase
    {
        protected RXY_MallContext db = new RXY_MallContext();

        protected Response<T> ReturnSuccess<T>(T result)
        {
            return new Response<T>() { code = 1, msg = "请求成功", data = result };
        }

        protected Response<T> ReturnError<T>(string msg)
        {
            return new Response<T>() { code = 0, msg = msg};
        }
    }
}
